package com.bdqn.t330.ch07.service;

import com.bdqn.t330.ch07.dao.RoleMapper;
import com.bdqn.t330.ch07.dao.SysUserMapper;
import com.bdqn.t330.ch07.entity.SysRole;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImp implements RoleService {


    //service一定要清楚去spring容器中拿dao的实例，
    //service自身要注册实例到spring容器,在这里我们通常用@Service注解
    //在用@Service注解的时候，记住要让这个注解生效,被扫描到

    @Resource
    RoleMapper roleMapper;

    @Override
    public List<SysRole> getRoleListByBiz(SysRole sysRole) {
        return roleMapper.getRoleListBy(sysRole);
    }
}
